package com.jackykeke.opengldemo.texture2d

import android.opengl.GLSurfaceView
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.jackykeke.opengldemo.R
import com.jackykeke.opengldemo.renderer.texture2d.TextureRendererOrthogonalProjection

/**
 *  纹理贴图显示bitmap实践 正交投影调整显示效果
 */
class TextureRendererOrthogonalProjectionActivity : AppCompatActivity() {


    var mGLSurfaceView: GLSurfaceView? = null

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_texture_renderer_orthogonal_projection)
        setupView()
    }

    private fun setupView() {
        mGLSurfaceView = GLSurfaceView(this)
        setContentView(mGLSurfaceView)
        val renderer = TextureRendererOrthogonalProjection()
        //设置版本
        mGLSurfaceView?.apply {
            setEGLContextClientVersion(3)
            setRenderer(renderer)
        }


    }
}